package Demo6;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86136
 * Date: 2024-05-23
 * Time: 20:57
 */
public class Sub extends Base{
    private int z;

    public Sub(int x,int y,int z) {
        super(x,y);
        this.z = z;
    }
    public int getZ() {
        return this.z;
    }
    public int calculate() {
        return super.getX()*super.getY()*this.getZ();
    }
}
